/*****************************************************************************
 *
 *                      HUSONG PROPRIETARY INFORMATION
 *
 *          The information contained herein is proprietary to HUSONG
 *           and shall not be reproduced or disclosed in whole or in part
 *                    or used for any design or manufacture
 *              without direct written authorization from HUSONG.
 *
 *            Copyright (c) 2015 by HUSONG.  All rights reserved.
 *
 *****************************************************************************/
package me.send.business.service.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import me.send.business.service.BaseService;
import me.send.business.service.pojo.Message;

import org.springframework.stereotype.Service;

/**
 * @author maxmin
 *
 * @date 2015年8月25日 下午3:22:54
 */
@Service
public class MessageService extends BaseService {
	public int saveMessage(Message message){
		return messageMapper.addMessage(message);
	}
	
	public List<Message> getMessagese(int userid,long startid,int type,int size){
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("userid", userid);
		params.put("startid", startid);
		params.put("size", size);
		params.put("type", type);
		return messageMapper.getMessages(params);
	}
}
